//
//  LocOneService.m
//  lTTheOne
//
//  Created by sy on 2024/8/17.
//

#import "LocOneService.h"
#import "HeaderConfig.h"
#import "NSObject+Extansion.h"
#import "userInfoModel.h"

@implementation LocOneService
- (NSString *)port {
    return @"/app_server/v1/user/check_register_city";
}

- (NSString *)domain {
    return DHFMAINURL;
}
- (NSDictionary *)requstBody {
    return [self modelForDict];
}

- (void)headers {
    NSArray *ar = [userInfoModel bg_findAll:UserInfo];
    if (ar.count > 0) {
        userInfoModel *infomodel = ar[0];
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@", infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}
@end

@implementation outliersOneService
- (NSString *)port {
    return @"/app_server/v1/user/update_user_location";
}

- (NSString *)domain {
    return DHFMAINURL;
}
- (NSDictionary *)requstBody {
    return [self modelForDict];
}

- (void)headers {
    NSArray *ar = [userInfoModel bg_findAll:UserInfo];
    if (ar.count > 0) {
        userInfoModel *infomodel = ar[0];
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@", infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}
@end
